{include admin.inc.header}

{include admin.inc.top}

<div class="container-fluid content-body">
	<div class="main">
		{include admin.inc.menu}

		<section class="right-section" id="right-section">
			<!-- start of inner-frame -->
			<div class="inner-iframe">

				{include admin.inc.bread}

				<div class="inner-container">

					<!-- Nav tabs -->
					<ul class="nav nav-tabs" role="tablist" id="myTab" style="display: none;">
						<li role="presentation"><a href="#site" role="tab" data-toggle="tab">系统设置</a></li>
						<!--<li role="presentation"><a href="#email" role="tab" data-toggle="tab">邮件设置</a></li>-->
						<!--<li role="presentation"><a href="#message" role="tab" data-toggle="tab">短信设置</a></li>-->
						{loop $__sysmenus[$menu_key][subs] $k $v}
						{if $v[id]!=$menu_id}
						<li><a href="/{$v[url]}"><i class="glyphicon glyphicon-th-list"></i> {$v[name]}</a></li>
						{/if}
						{/loop}
					</ul>
					<ul class="nav nav-tabs" role="tablist" id="myTab">
						{loop $__sysmenus[$menu_key][subs] $k $v}
						<li{if $v[id]==$menu_id} class="active" role="presentation"{/if}>
							<a href="{if $v[id]==$menu_id}javascript:;{else}/{$v[url]}{/if}">
								<i class="glyphicon glyphicon-th-list"></i>
								{$v[name]}
							</a>
						</li>
						{/loop}
					</ul>

					<form role="form" class="content-add-form form-horizontal" id="content-add-form" autocomplete="off">
						<!-- Tab panes -->
						<div class="tab-content" style="padding-top: 20px;">
							<!-- 网站设置 -->
							<div role="tabpanel" class="tab-pane fade" id="site">

								<div class="form-group">
									<label class="col-sm-2 control-label">网站名称</label>
									<div class="col-sm-10">
										<input type="text" name="data[site_title]" class="form-control" cname="网站名称" value="{$item[site_title]}" />
										<p class="help-block"></p>
									</div>
								</div>

								<div class="form-group">
									<label class="col-sm-2 control-label">管理后台名称</label>
									<div class="col-sm-10">
										<input type="text" name="data[admin_title]" class="form-control" cname="管理后台名称" value="{$item[admin_title]}" />
										<p class="help-block"></p>
									</div>
								</div>

								<div class="form-group">
									<label class="col-sm-2 control-label">网站版权</label>
									<div class="col-sm-10">
										<input type="text" name="data[site_copyright]" class="form-control" cname="网站版权" value="{$item[site_copyright]}" />
										<p class="help-block"></p>
									</div>
								</div>

								<div class="form-group">
									<label class="col-sm-2 control-label">ICP备案号</label>
									<div class="col-sm-10">
										<input type="text" name="data[site_icp]" class="form-control" cname="网站版权" value="{$item[site_icp]}" />
										<p class="help-block"></p>
									</div>
								</div>

								<div class="form-group">
									<label class="col-sm-2 control-label">API白名单</label>
									<div class="col-sm-10">
										<input type="text" name="data[ip_white_list]" class="form-control" cname="API白名单" value="{$item[ip_white_list]}" />
										<p class="help-block">多个ip之间用逗号隔开</p>
									</div>
								</div>

								<div class="form-group">
									<label class="col-sm-2 control-label">超级管理员IDS</label>
									<div class="col-sm-10">
										<input type="text" name="data[super_managers]" class="form-control" cname="超级管理员IDS" value="{$item[super_managers]}" />
										<p class="help-block">填写超级管理员的ID，多个超级管理员使用英文逗号隔开</p>
									</div>
								</div>


							</div><!-- END 网站设置 -->

							<!-- 邮件设置 -->
							<div role="tabpanel" class="tab-pane fade" id="email">

								<div class="form-group">
									<label class="col-sm-2 control-label">SMTP主机</label>
									<div class="col-sm-10">
										<input type="text" name="data[smtp_host]" class="form-control" cname="SMTP主机" value="{$item[smtp_host]}" />
										<p class="help-block"></p>
									</div>
								</div>

								<div class="form-group">
									<label class="col-sm-2 control-label">SMTP端口</label>
									<div class="col-sm-10">
										<input type="text" name="data[smtp_port]" class="form-control" cname="SMTP端口" value="{$item[smtp_port]}" />
										<p class="help-block"></p>
									</div>
								</div>

								<div class="form-group">
									<label class="col-sm-2 control-label">SMTP账户</label>
									<div class="col-sm-10">
										<input type="text" name="data[smtp_user]" class="form-control" cname="SMTP账户" value="{$item[smtp_user]}" />
										<p class="help-block"></p>
									</div>
								</div>

								<div class="form-group">
									<label class="col-sm-2 control-label">SMTP密码</label>
									<div class="col-sm-10">
										<input type="text" name="data[smtp_pass]" class="form-control" cname="SMTP密码" value="{$item[smtp_pass]}" />
										<p class="help-block"></p>
									</div>
								</div>

							</div><!-- END 邮件设置 -->

						</div><!-- END panel -->

						<div class="form-group">
							<div class="col-sm-offset-2 col-sm-10">
								<div class="btn-group btn-group-or">
									<a href="{$update_url}" class="btn btn-primary" id="submit_btn"
									   proxy='{"method":"post", "location":"{$index_url}"}'>提交保存</a>
									<span class="or">OR</span>
									<button type="reset" class="btn btn-default">重置表单</button>
								</div>
							</div>
						</div>

					</form>

				</div><!-- end of inner container -->

			</div><!-- end of inner frame-->

		</section>

	</div>
</div>

{include admin.inc.footer}

<script>
	seajs.use("setting", function(exports) {
		exports.init({});
	});
</script>
</body>
</html>
